<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var arr = new Array(10);
        var sum=0;
        var sum1=sum2=0;
        for (let i = 0; i < arr.length; i++) {
        arr[i] =Math.ceil(Math.random()*100);
        sum+=arr[i];
        if(arr[i]%2!=0){
            sum1+=arr[i];
        }else{
            sum2+=arr[i];
        }
      var Array= arr.sort(function(a,b){return a-b});
    }
        var avg = sum / arr.length;
        var result = [];
        for (let index = 0; index < arr.length; index++) {
            const element = arr[index];
            if(element > avg){
                result.push(element);
            }
            
        }
        console.log("随机产生的10个数的数组为：")
        console.log(arr)
        console.log("排序后的10个数：")
        console.log(Array)
        console.log("上述数组中数的总和为：")
        console.log(sum)
        console.log("奇数和为：")
        console.log(sum1)
        console.log("偶数和为：")
        console.log(sum2)
        console.log("比上述数组的平均值"+avg+"大的数有：");
        console.log(result);
    </script>
</head>
<body>
    
</body>
</html>